package 蓝桥杯;

import java.util.Scanner;

public class stringtest  {
    public static void main(String[] args) {
        int a=0,b=0,c=0;
        Scanner sc=new Scanner(System.in);
        String s=sc.nextLine();
        String[] arr=s.split(";");
        for(String i:arr){
            i = i.trim();
            if(i.isEmpty()){
                continue; 
            }
            String[] temp=i.split(":=");
            String var=temp[0].trim();
            String value=temp[1].trim();
            int val=0;
            if(Character.isDigit(value.charAt(0))){
                val=Integer.parseInt(value);
            }else{
                switch (value) {
                    case "a":
                        val = a;
                        break;
                    case "b":
                        val = b;
                        break;
                    case "c":
                        val = c;
                        break;
        
                    default:
                        break;
                }
            }
            switch (var) {
                case "a":
                    a = val;
                    break;
                case "b":
                    b = val;
                    break;
                case "c":
                    c = val;
                    break; 
            }
        }
        System.out.println("a=" + a + ", b=" + b + ", c=" + c);
        
    }
}
